<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>出货信息</title>
<link rel="stylesheet" type="text/css" href="/static/plugins/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="/static/css/account/accountList.css">
<style type="text/css">
h1{
    text-align: center;
    margin: 20px;
    font-weight: bold;
}
.layui-table th{
    /*表头内容居中显示*/
    text-align: center;
}
.layui-table tbody input{
	width: 100%;
}
.layui-form-select .layui-input {
    padding-right: 30px;
    text-align: center;
    cursor: pointer;
    width: 100%;
}
</style>
</head>
<body class="layui-layout-body">
	<input type="hidden" id="sessionUser" th:value="${session.userSession.realName}">
	<div class="layui-layout layui-layout-admin">
		<!-- header nav部分 -->
	<div th:insert="~{/common/common :: copy}"></div>
	<div class="layui-body">
		<h1>日常出货信息单</h1>	
		<form class="layui-form" action="" id="accountForm">
			<div class="layui-fluid layui-from-consider">
				<h2 class="title">取货信息</h2>
					<div class="layui-row">
						<div class="layui-col-md12">
							<div class="layui-row">
								<div class="layui-col-md3">
									<div class="layui-form-item">
										<label class="layui-form-label">货单时间</label>
										<div class="layui-input-inline">
											<input type="text" name="dayTime" id="dayTime"  required lay-verify="required" placeholder="出货日期" autocomplete="off" class="layui-input">   
										</div>
									</div>
								</div>
								<div class="layui-col-md3">
									<div class="layui-form-item">
										<label class="layui-form-label">日常编码</label>
										<div class="layui-input-inline">
											<input type="text" name="dayCode" id="dayCode" th:value="${dayCode}" required lay-verify="required"  class="layui-input" readonly="readonly">   
										</div>
									</div>
								</div>
								<div class="layui-col-md3">
									<div class="layui-form-item">
										<label class="layui-form-label">平台来源</label>
										<div class="layui-input-block">
											<div th:if="${resource}  eq tm">
												<input type="radio" name="platSource" value="tm" title="天猫" checked="" >
											</div>
											<div th:if="${resource } eq pdd">
												<input type="radio" name="platSource" value="pdd" title="拼多多" checked="" >
											</div>
										</div>
									</div>
								</div>
							</div>
							<!-- 表格 -->
							<div class="layui-row">
								<table class="layui-table" lay-even lay-skin="row" id="tb_goods">
									<thead>
										<tr style="background: #79ece2">
											<th>货源</th>
											<th>款号</th>
											<th>颜色</th>
											<th>尺码</th>
											<th>原价(元)</th>
											<th>数量</th>
											<th>总额(元)</th>
											<th>类型</th>
											<th>确认人</th>
											<th>备注</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="goods_info">
										<tr>
											<td>
												<input type="hidden" name="index" id="index0"  value="0">
												<input type="text" name="goodsSource[0]" id="goodsSource0" required lay-verify="required" placeholder="拿货来源" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="goodsNumber[0]" id="goodsNumber0" required lay-verify="required" placeholder="款号编码" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="goodsColor[0]" id="goodsColor0" required lay-verify="required" placeholder="颜色" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="goodsSize[0]" id="goodsSize0" required lay-verify="required" placeholder="尺码大小" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="inPrice[0]" id="inPrice0" required lay-verify="required" placeholder="价格(元)" onchange="valiteNumber(this)" onblur="getSumPrice(0)" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="number[0]" id="number0" required lay-verify="required" placeholder="数量" onblur="getSumPrice(0)" onchange="valiteNumber(this)" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="sumPrice[0]" id="sumPrice0" required lay-verify="required" placeholder="总额" onchange="valiteNumber(this)" autocomplete="off" class="layui-input" readonly="readonly">
											</td>
											<td>
												<input type="hidden" name="goodsTypeCode" value="QH">
												<input type="text" class="layui-input" readonly="readonly" value="取货">
											</td>
											<td>
												<input type="text" name="goodsConfirmPerson[0]" id="goodsConfirmPerson0" required lay-verify="required" th:value="${session.userSession.realName}" placeholder="确认人" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="goodsRemake[0]" id="remake0" required lay-verify="required" placeholder="备注" autocomplete="off" class="layui-input">
											</td>
											<td id="td0">
												<div class="layui-inline" onclick="addTr(1)">
													<i class="layui-icon layui-icon-add-circle-fine"></i>
												</div>
											</td>
										</tr>
									</tbody>
								</table> 
							</div>
						</div>
					</div>
				</div>
			<div class="layui-fluid layui-from-consider">
				<h2 class="title">流水明细信息</h2>
					<div class="layui-row">
						<div class="layui-col-md12">
							<div class="layui-row">
								<div class="layui-col-md3">
									<div class="layui-form-item">
										<label class="layui-form-label">支出时间</label>
										<div class="layui-input-inline">
											<input type="text" name="payTime" id="payTime"  required lay-verify="required" placeholder="支出日期" autocomplete="off" class="layui-input">   
										</div>
									</div>
								</div>
							</div>
							<!-- 表格 -->
							<div class="layui-row">
								<table class="layui-table" lay-even lay-skin="row" id="tb_account_detail">
									<thead>
										<tr style="background: #79ece2">
											<th>支出类型</th>
											<th>支出金额(元)</th>
											<th>描述</th>
											<th>确认人</th>
											<th>备注</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="account_detail_info">
										<tr>
											<td>
												<select name="typeCode[0]" id="typeCode0" class="layui-form" disabled="disabled">
													<option value="QH">取货</option>
												</select>
											</td>
											<td>
												<input type="text" name="payPrice[0]" id="payPrice0" required lay-verify="required" placeholder="支出金额(元)" onchange="valiteNumber(this)" autocomplete="off" class="layui-input" readonly="readonly">
											</td>
											<td>
												<input type="text" name="describe[0]" id="describe0" required lay-verify="required" placeholder="描述" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="detailConfirmPerson[0]" id="detailConfirmPerson0" required lay-verify="required" th:value="${session.userSession.realName}" placeholder="确认人" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="detailRemake[0]" id="detailRemake0" required lay-verify="required" placeholder="备注" autocomplete="off" class="layui-input">
											</td>
											<td id="td1">
												<div class="layui-inline" onclick="addTr(2)">
													<i class="layui-icon layui-icon-add-circle-fine"></i>
												</div>
											</td>
										</tr>
									</tbody>
								</table> 
							</div>
						</div>
					</div>
				</div>
			<div class="layui-fluid layui-from-consider">
				<h2 class="title">汇总信息</h2>
					<div class="layui-row">
						<div class="layui-col-md12">
							<!-- 表格 -->
							<div class="layui-row">
								<table class="layui-table" lay-even lay-skin="row" id="tb_account_hz">
									<thead>
										<tr style="background: #79ece2">
											<th>支出总金额(元)</th>
											<th>是否已对账完成</th>
											<th>确认人</th>
											<th>备注</th>
										</tr>
									</thead>
									<tbody id="account_hz_info">
										<tr id="tr2">
											<td>
												<input type="text" name="paySumPrice" id="paySumPrice" onchange="valiteNumber(this)" required lay-verify="required" placeholder="支出总金额(元)" value="0" autocomplete="off" class="layui-input" readonly="readonly">
											</td>
											<td style="text-align: center;">
												<input type="radio" name="isCompleteAccount" value="1" title="是" >
												<input type="radio" name="isCompleteAccount" value="0" title="否" checked="" >
											</td>
											<td>
												<input type="text" name="confirmPerson" id="confirmPerson" required lay-verify="required" placeholder="确认人" th:value="${session.userSession.realName}" autocomplete="off" class="layui-input">
											</td>
											<td>
												<input type="text" name="remake" id="remake" required lay-verify="required" placeholder="备注" autocomplete="off" class="layui-input">
											</td>
										</tr>
									</tbody>
								</table> 
							</div>
						</div>
					</div>
				</div>
				<div class="layui-row layui-fluid">
					<div class="layui-col-md12">
						<div class="layui-row" style="text-align: center;">
							<button type="button" class="layui-btn layui-btn-radius" onclick="save()">提交保存</button>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
	<script type="text/javascript" src="/static/js/jquery-3.5.1.min.js"></script>
	<script type="text/javascript" src="/static/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="/static/plugins/layui/layui.all.js"></script>
	<script type="text/javascript" src="/static/js/common/common.js"></script>
	<script type="text/javascript" src="/static/js/account/base/add.js"></script>
</body>
</html>
